import request from '@/utils/request'

//增加学生
export function save(data) {
  return request({
    url: '/jms/jmsStudent/save',
    method: 'post',
    data: data
  })
}
//通过excel文件批量上传学生数据
export function saveStudentByBatch(data){
  return request({
    url: '/aliyun/oss/saveStudentByBatch',
    method: 'post',
    data: data,
    headers: {'Content-Type': 'multipart/form-data'},
  })
}

//删除学生
export function deleteStudent(id) {
  return request({
    url: '/jms/jmsStudent/delete/'+id,
    method: 'get',
  })
}

//批量删除学生信息
export function deleteByBatch(ids) {
  return request({
    url: '/jms/jmsStudent/deleteByBatch',
    method: 'post',
    data:ids
  })
}


//获取学生信息
export function getStudentInfo() {
  return request({
    url: '/jms/jmsStudent/getStudentInfo',
    method: 'get',
  })
}

//学生完善自己个人信息
export function changeStudentInfo(data) {
  return request({
    url: '/jms/jmsStudent/changeStudentInfo',
    method: 'post',
    data:data
  })
}

//修改学生
export function update(data) {
  return request({
    url: '/jms/jmsStudent/update',
    method: 'post',
    data:data
  })
}

//根据ID查询学生信息
export function findById(id) {
  return request({
    url: '/jms/jmsStudent/findById/'+id,
    method: 'get',
  })
}


//根据ID查询学生信息
export function getStudentInfoById(id) {
  return request({
    url: '/jms/jmsStudent/findById/'+id,
    method: 'get',
  })
}


//分页查询学生信息
export function findByPage(data) {
  return request({
    url: '/jms/jmsStudent/findByPage',
    method: 'post',
    data:data
  })
}

//上传咨询一寸照到OSS
export function uploadStudentImage(data) {
  return request({
    url: '/aliyun/oss/student',
    method: 'post',
    data:data,
    headers: {'Content-Type': 'multipart/form-data'}
  })
}












